<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
    <title>Login</title>
    <link rel="icon" type="image/png" href="{{ url_for('static', filename='phillfinance.png') }}">
</head>
<body>
    <nav>
        <ul>
            <li><a href="{{ url_for('home') }}">Home</a></li>
            <li><a href="{{ url_for('register') }}">Register</a></li>
        </ul>
    </nav>

    <h1>Login</h1>

    <!-- Display flash messages for login -->
{% with messages = get_flashed_messages(with_categories=True) %}
{% if messages %}
    <ul class="flashes">
        {% for category, message in messages %}
            <li class="flash {{ category }}">{{ message }}</li>
        {% endfor %}
    </ul>
{% endif %}
{% endwith %}

<form method="POST">
{{ form.hidden_tag() }}
<div>{{ form.username.label }} {{ form.username() }}</div>
<div>{{ form.password.label }} {{ form.password() }}</div>
<div>{{ form.submit() }}</div>
</form>


</body>
</html>
